

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
    <style>
    /* base */
    html,
    body,
    .container {
      width: 100%;
      height: 100%;
    }

    a,
    a:link,
    a:visited {
      text-decoration: none;
      color: inherit;
    }

    ul {
      list-style: none;
    }

    *,
    ::before,
    ::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    *:focus {
      outline: 0;
    }

    .container {
      display: flex;
      padding-top: 20px;
    }

    /* Nav */
    .container .doc-nav {
      position: fixed;
      height: 100%;
      margin: 0 30px 0 40px;
      width: 280px;
    }

    .doc-nav .nav-header {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      background-color: rgb(240, 241, 242);
      height: 40px;
      padding: 16px;
      font-size: 18px;
      font-weight: 500;
      color: rgb(62, 64, 66);
      cursor: pointer;
    }

    .doc-nav .nav-content {
      height: calc(100% - 40px);
      overflow-y: auto;
      color: rgb(32, 34, 36);
    }

    .doc-nav .nav-content .nav-list,
    .doc-nav .nav-content .nav-sub-list {
      line-height: 1.5rem;
    }

    .doc-nav .nav-content .nav-label {
      display: inline-block;
      position: relative;
      padding: 2px 0 2px 20px;
      margin-bottom: 4px;
    }

    .doc-nav .nav-content .nav-sub-label {
      position: relative;
      padding: 2px 0 2px 40px;
      font-size: 14px;
    }

    .doc-nav .nav-content .nav-sub-label:hover {
      text-decoration: underline;
    }

    .doc-nav .nav-content .nav-list .nav-label.group::before {
      border-bottom: 0.25rem solid transparent;
      border-left: 0.25rem solid #6e7072;
      border-right: 0;
      border-top: 0.25rem solid transparent;
      content: '';
      display: block;
      height: 0;
      left: 0.5rem;
      position: absolute;
      top: 0.625rem;
      transition: transform 0.1s linear;
      width: 0;
    }

    .doc-nav .nav-content .nav-list .nav-label.group.active::before {
      transform: rotate(90deg);
    }

    /* doc content */
    .container .doc-content {
      position: fixed;
      height: 100%;
      width: calc(100% - 80px - 40px - 30px - 240px);
      right: 0%;
      overflow-y: auto;
    }

    .doc-title {
      border-bottom: 1px solid #dcdee0;
      font-size: 22px;
      margin: 8px 0 0;
      padding-bottom: 16px;
    }

    .doc-content h3 {
      font-size: 24px;
      font-weight: 600;
      margin: 24px 0;
    }

    .doc-content h4 {
      font-size: 22px;
      font-weight: 500;
      margin: 30px 0 8px;
    }

    .doc-content h4 span {
      color: #007d9c;
    }

    .doc-content .doc-declare {
      background-color: #fafafa;
      border-radius: 5px;
      border: 1px solid #ccc;
      font-size: 14px;
      overflow-x: auto;
      padding: 10px;
      tab-size: 4;
      line-height: 20px;
    }

    .doc-content .doc-comment {
      font-size: 16px;
      margin: 16px 0;
      line-height: 24px;
      word-break: break-word;
    }
  </style>

</head>
<body>
  <div class="container">
    <div class="doc-nav">
      <a href="#Documentation" class="nav-header">Documentation</a>
      <nav class="nav-content">
        <ul class="nav-list">
          <li>
            <a href="#includes" class="nav-label">Includes</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#config.h" class="nav-sub-label">config.h</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_CONFIG_FILE" class="nav-sub-label">MBEDTLS_CONFIG_FILE</a>
              </li>
      

              <li>
                <a href="#bignum.h" class="nav-sub-label">bignum.h</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#macros" class="nav-label">Macros</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#MBEDTLS_BN_MUL_H" class="nav-sub-label">MBEDTLS_BN_MUL_H</a>
              </li>
      

              <li>
                <a href="#asm" class="nav-sub-label">asm</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_HUIT" class="nav-sub-label">MULADDC_HUIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_HUIT" class="nav-sub-label">MULADDC_HUIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_CANNOT_USE_R7" class="nav-sub-label">MULADDC_CANNOT_USE_R7</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#EMIT" class="nav-sub-label">EMIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_HUIT" class="nav-sub-label">MULADDC_HUIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      

              <li>
                <a href="#MULADDC_INIT" class="nav-sub-label">MULADDC_INIT</a>
              </li>
      

              <li>
                <a href="#MULADDC_CORE" class="nav-sub-label">MULADDC_CORE</a>
              </li>
      

              <li>
                <a href="#MULADDC_STOP" class="nav-sub-label">MULADDC_STOP</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#functions" class="nav-label">Functions</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#vars" class="nav-label">Vars</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#consts" class="nav-label">Consts</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#types" class="nav-label">Types</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#typedefs" class="nav-label">Typedefs</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
        </ul>
      </nav>
    </div>
    <div class="doc-content">
      <h2 id="Documentation" class="doc-title">Documentation</h2>
      <h3 id="includes">Includes</h3>
      

      <h4 id="config.h"><span>config.h</span></h4>
      <pre class="doc-declare"><code>#include "config.h"
</code></pre>
      <pre class="doc-comment">#include "config.h"
</pre>

      <h4 id="MBEDTLS_CONFIG_FILE"><span>MBEDTLS_CONFIG_FILE</span></h4>
      <pre class="doc-declare"><code>#include MBEDTLS_CONFIG_FILE
</code></pre>
      <pre class="doc-comment">#include MBEDTLS_CONFIG_FILE
</pre>

      <h4 id="bignum.h"><span>bignum.h</span></h4>
      <pre class="doc-declare"><code>#include "bignum.h"
</code></pre>
      <pre class="doc-comment">#include "bignum.h"
</pre>
      <h3 id="macros">Macros</h3>
      

      <h4 id="MBEDTLS_BN_MUL_H">Marco <span>MBEDTLS_BN_MUL_H</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_BN_MUL_H
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="asm">Marco <span>asm</span></h4>
      <pre class="doc-declare"><code>#define asm __asm
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                       \
   asm(                                   \
       "movl   %%ebx, %0           \n\t"  \
       "movl   %5, %%esi           \n\t"  \
       "movl   %6, %%edi           \n\t"  \
       "movl   %7, %%ecx           \n\t"  \
       "movl   %8, %%ebx           \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                       \
       "lodsl                      \n\t"  \
       "mull   %%ebx               \n\t"  \
       "addl   %%ecx,   %%eax      \n\t"  \
       "adcl   $0,      %%edx      \n\t"  \
       "addl   (%%edi), %%eax      \n\t"  \
       "adcl   $0,      %%edx      \n\t"  \
       "movl   %%edx,   %%ecx      \n\t"  \
       "stosl                      \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_HUIT">Marco <span>MULADDC_HUIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_HUIT                           \
       "movd     %%ecx,     %%mm1      \n\t"  \
       "movd     %%ebx,     %%mm0      \n\t"  \
       "movd     (%%edi),   %%mm3      \n\t"  \
       "paddq    %%mm3,     %%mm1      \n\t"  \
       "movd     (%%esi),   %%mm2      \n\t"  \
       "pmuludq  %%mm0,     %%mm2      \n\t"  \
       "movd     4(%%esi),  %%mm4      \n\t"  \
       "pmuludq  %%mm0,     %%mm4      \n\t"  \
       "movd     8(%%esi),  %%mm6      \n\t"  \
       "pmuludq  %%mm0,     %%mm6      \n\t"  \
       "movd     12(%%esi), %%mm7      \n\t"  \
       "pmuludq  %%mm0,     %%mm7      \n\t"  \
       "paddq    %%mm2,     %%mm1      \n\t"  \
       "movd     4(%%edi),  %%mm3      \n\t"  \
       "paddq    %%mm4,     %%mm3      \n\t"  \
       "movd     8(%%edi),  %%mm5      \n\t"  \
       "paddq    %%mm6,     %%mm5      \n\t"  \
       "movd     12(%%edi), %%mm4      \n\t"  \
       "paddq    %%mm4,     %%mm7      \n\t"  \
       "movd     %%mm1,     (%%edi)    \n\t"  \
       "movd     16(%%esi), %%mm2      \n\t"  \
       "pmuludq  %%mm0,     %%mm2      \n\t"  \
       "psrlq    $32,       %%mm1      \n\t"  \
       "movd     20(%%esi), %%mm4      \n\t"  \
       "pmuludq  %%mm0,     %%mm4      \n\t"  \
       "paddq    %%mm3,     %%mm1      \n\t"  \
       "movd     24(%%esi), %%mm6      \n\t"  \
       "pmuludq  %%mm0,     %%mm6      \n\t"  \
       "movd     %%mm1,     4(%%edi)   \n\t"  \
       "psrlq    $32,       %%mm1      \n\t"  \
       "movd     28(%%esi), %%mm3      \n\t"  \
       "pmuludq  %%mm0,     %%mm3      \n\t"  \
       "paddq    %%mm5,     %%mm1      \n\t"  \
       "movd     16(%%edi), %%mm5      \n\t"  \
       "paddq    %%mm5,     %%mm2      \n\t"  \
       "movd     %%mm1,     8(%%edi)   \n\t"  \
       "psrlq    $32,       %%mm1      \n\t"  \
       "paddq    %%mm7,     %%mm1      \n\t"  \
       "movd     20(%%edi), %%mm5      \n\t"  \
       "paddq    %%mm5,     %%mm4      \n\t"  \
       "movd     %%mm1,     12(%%edi)  \n\t"  \
       "psrlq    $32,       %%mm1      \n\t"  \
       "paddq    %%mm2,     %%mm1      \n\t"  \
       "movd     24(%%edi), %%mm5      \n\t"  \
       "paddq    %%mm5,     %%mm6      \n\t"  \
       "movd     %%mm1,     16(%%edi)  \n\t"  \
       "psrlq    $32,       %%mm1      \n\t"  \
       "paddq    %%mm4,     %%mm1      \n\t"  \
       "movd     28(%%edi), %%mm5      \n\t"  \
       "paddq    %%mm5,     %%mm3      \n\t"  \
       "movd     %%mm1,     20(%%edi)  \n\t"  \
       "psrlq    $32,       %%mm1      \n\t"  \
       "paddq    %%mm6,     %%mm1      \n\t"  \
       "movd     %%mm1,     24(%%edi)  \n\t"  \
       "psrlq    $32,       %%mm1      \n\t"  \
       "paddq    %%mm3,     %%mm1      \n\t"  \
       "movd     %%mm1,     28(%%edi)  \n\t"  \
       "addl     $32,       %%edi      \n\t"  \
       "addl     $32,       %%esi      \n\t"  \
       "psrlq    $32,       %%mm1      \n\t"  \
       "movd     %%mm1,     %%ecx      \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                   \
       "emms                   \n\t"  \
       "movl   %4, %%ebx       \n\t"  \
       "movl   %%ecx, %1       \n\t"  \
       "movl   %%edi, %2       \n\t"  \
       "movl   %%esi, %3       \n\t"  \
       : "=m" (t), "=m" (c), "=m" (d), "=m" (s)       \
       : "m" (t), "m" (s), "m" (d), "m" (c), "m" (b)  \
       : "eax", "ebx", "ecx", "edx", "esi", "edi"     \
   );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                   \
       "movl   %4, %%ebx       \n\t"  \
       "movl   %%ecx, %1       \n\t"  \
       "movl   %%edi, %2       \n\t"  \
       "movl   %%esi, %3       \n\t"  \
       : "=m" (t), "=m" (c), "=m" (d), "=m" (s)       \
       : "m" (t), "m" (s), "m" (d), "m" (c), "m" (b)  \
       : "eax", "ebx", "ecx", "edx", "esi", "edi"     \
   );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                       \
   asm(                                   \
       "xorq   %%r8, %%r8\n"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                       \
       "movq   (%%rsi), %%rax\n"          \
       "mulq   %%rbx\n"                   \
       "addq   $8, %%rsi\n"               \
       "addq   %%rcx, %%rax\n"            \
       "movq   %%r8, %%rcx\n"             \
       "adcq   $0, %%rdx\n"               \
       "nop    \n"                        \
       "addq   %%rax, (%%rdi)\n"          \
       "adcq   %%rdx, %%rcx\n"            \
       "addq   $8, %%rdi\n"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                       \
       : "+c" (c), "+D" (d), "+S" (s)     \
       : "b" (b)                          \
       : "rax", "rdx", "r8"               \
   );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                   \
   asm(                               \
       "movl   %3, %%a2        \n\t"  \
       "movl   %4, %%a3        \n\t"  \
       "movl   %5, %%d3        \n\t"  \
       "movl   %6, %%d2        \n\t"  \
       "moveq  #0, %%d0        \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                   \
       "movel  %%a2@+, %%d1    \n\t"  \
       "mulul  %%d2, %%d4:%%d1 \n\t"  \
       "addl   %%d3, %%d1      \n\t"  \
       "addxl  %%d0, %%d4      \n\t"  \
       "moveq  #0,   %%d3      \n\t"  \
       "addl   %%d1, %%a3@+    \n\t"  \
       "addxl  %%d4, %%d3      \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                   \
       "movl   %%d3, %0        \n\t"  \
       "movl   %%a3, %1        \n\t"  \
       "movl   %%a2, %2        \n\t"  \
       : "=m" (c), "=m" (d), "=m" (s)             \
       : "m" (s), "m" (d), "m" (c), "m" (b)       \
       : "d0", "d1", "d2", "d3", "d4", "a2", "a3" \
   );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_HUIT">Marco <span>MULADDC_HUIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_HUIT                       \
       "movel  %%a2@+,  %%d1       \n\t"  \
       "mulul  %%d2,    %%d4:%%d1  \n\t"  \
       "addxl  %%d3,    %%d1       \n\t"  \
       "addxl  %%d0,    %%d4       \n\t"  \
       "addl   %%d1,    %%a3@+     \n\t"  \
       "movel  %%a2@+,  %%d1       \n\t"  \
       "mulul  %%d2,    %%d3:%%d1  \n\t"  \
       "addxl  %%d4,    %%d1       \n\t"  \
       "addxl  %%d0,    %%d3       \n\t"  \
       "addl   %%d1,    %%a3@+     \n\t"  \
       "movel  %%a2@+,  %%d1       \n\t"  \
       "mulul  %%d2,    %%d4:%%d1  \n\t"  \
       "addxl  %%d3,    %%d1       \n\t"  \
       "addxl  %%d0,    %%d4       \n\t"  \
       "addl   %%d1,    %%a3@+     \n\t"  \
       "movel  %%a2@+,  %%d1       \n\t"  \
       "mulul  %%d2,    %%d3:%%d1  \n\t"  \
       "addxl  %%d4,    %%d1       \n\t"  \
       "addxl  %%d0,    %%d3       \n\t"  \
       "addl   %%d1,    %%a3@+     \n\t"  \
       "movel  %%a2@+,  %%d1       \n\t"  \
       "mulul  %%d2,    %%d4:%%d1  \n\t"  \
       "addxl  %%d3,    %%d1       \n\t"  \
       "addxl  %%d0,    %%d4       \n\t"  \
       "addl   %%d1,    %%a3@+     \n\t"  \
       "movel  %%a2@+,  %%d1       \n\t"  \
       "mulul  %%d2,    %%d3:%%d1  \n\t"  \
       "addxl  %%d4,    %%d1       \n\t"  \
       "addxl  %%d0,    %%d3       \n\t"  \
       "addl   %%d1,    %%a3@+     \n\t"  \
       "movel  %%a2@+,  %%d1       \n\t"  \
       "mulul  %%d2,    %%d4:%%d1  \n\t"  \
       "addxl  %%d3,    %%d1       \n\t"  \
       "addxl  %%d0,    %%d4       \n\t"  \
       "addl   %%d1,    %%a3@+     \n\t"  \
       "movel  %%a2@+,  %%d1       \n\t"  \
       "mulul  %%d2,    %%d3:%%d1  \n\t"  \
       "addxl  %%d4,    %%d1       \n\t"  \
       "addxl  %%d0,    %%d3       \n\t"  \
       "addl   %%d1,    %%a3@+     \n\t"  \
       "addxl  %%d0,    %%d3       \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                       \
   asm(                                   \
       "ld     r3, %3              \n\t"  \
       "ld     r4, %4              \n\t"  \
       "ld     r5, %5              \n\t"  \
       "ld     r6, %6              \n\t"  \
       "addi   r3, r3, -8          \n\t"  \
       "addi   r4, r4, -8          \n\t"  \
       "addic  r5, r5,  0          \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                       \
       "ldu    r7, 8(r3)           \n\t"  \
       "mulld  r8, r7, r6          \n\t"  \
       "mulhdu r9, r7, r6          \n\t"  \
       "adde   r8, r8, r5          \n\t"  \
       "ld     r7, 8(r4)           \n\t"  \
       "addze  r5, r9              \n\t"  \
       "addc   r8, r8, r7          \n\t"  \
       "stdu   r8, 8(r4)           \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                       \
       "addze  r5, r5              \n\t"  \
       "addi   r4, r4, 8           \n\t"  \
       "addi   r3, r3, 8           \n\t"  \
       "std    r5, %0              \n\t"  \
       "std    r4, %1              \n\t"  \
       "std    r3, %2              \n\t"  \
       : "=m" (c), "=m" (d), "=m" (s)             \
       : "m" (s), "m" (d), "m" (c), "m" (b)       \
       : "r3", "r4", "r5", "r6", "r7", "r8", "r9" \
   );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                       \
   asm(                                   \
       "ld     %%r3, %3            \n\t"  \
       "ld     %%r4, %4            \n\t"  \
       "ld     %%r5, %5            \n\t"  \
       "ld     %%r6, %6            \n\t"  \
       "addi   %%r3, %%r3, -8      \n\t"  \
       "addi   %%r4, %%r4, -8      \n\t"  \
       "addic  %%r5, %%r5,  0      \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                       \
       "ldu    %%r7, 8(%%r3)       \n\t"  \
       "mulld  %%r8, %%r7, %%r6    \n\t"  \
       "mulhdu %%r9, %%r7, %%r6    \n\t"  \
       "adde   %%r8, %%r8, %%r5    \n\t"  \
       "ld     %%r7, 8(%%r4)       \n\t"  \
       "addze  %%r5, %%r9          \n\t"  \
       "addc   %%r8, %%r8, %%r7    \n\t"  \
       "stdu   %%r8, 8(%%r4)       \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                       \
       "addze  %%r5, %%r5          \n\t"  \
       "addi   %%r4, %%r4, 8       \n\t"  \
       "addi   %%r3, %%r3, 8       \n\t"  \
       "std    %%r5, %0            \n\t"  \
       "std    %%r4, %1            \n\t"  \
       "std    %%r3, %2            \n\t"  \
       : "=m" (c), "=m" (d), "=m" (s)             \
       : "m" (s), "m" (d), "m" (c), "m" (b)       \
       : "r3", "r4", "r5", "r6", "r7", "r8", "r9" \
   );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                   \
   asm(                               \
       "lwz    r3, %3          \n\t"  \
       "lwz    r4, %4          \n\t"  \
       "lwz    r5, %5          \n\t"  \
       "lwz    r6, %6          \n\t"  \
       "addi   r3, r3, -4      \n\t"  \
       "addi   r4, r4, -4      \n\t"  \
       "addic  r5, r5,  0      \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                   \
       "lwzu   r7, 4(r3)       \n\t"  \
       "mullw  r8, r7, r6      \n\t"  \
       "mulhwu r9, r7, r6      \n\t"  \
       "adde   r8, r8, r5      \n\t"  \
       "lwz    r7, 4(r4)       \n\t"  \
       "addze  r5, r9          \n\t"  \
       "addc   r8, r8, r7      \n\t"  \
       "stwu   r8, 4(r4)       \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                   \
       "addze  r5, r5          \n\t"  \
       "addi   r4, r4, 4       \n\t"  \
       "addi   r3, r3, 4       \n\t"  \
       "stw    r5, %0          \n\t"  \
       "stw    r4, %1          \n\t"  \
       "stw    r3, %2          \n\t"  \
       : "=m" (c), "=m" (d), "=m" (s)             \
       : "m" (s), "m" (d), "m" (c), "m" (b)       \
       : "r3", "r4", "r5", "r6", "r7", "r8", "r9" \
   );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                       \
   asm(                                   \
       "lwz    %%r3, %3            \n\t"  \
       "lwz    %%r4, %4            \n\t"  \
       "lwz    %%r5, %5            \n\t"  \
       "lwz    %%r6, %6            \n\t"  \
       "addi   %%r3, %%r3, -4      \n\t"  \
       "addi   %%r4, %%r4, -4      \n\t"  \
       "addic  %%r5, %%r5,  0      \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                       \
       "lwzu   %%r7, 4(%%r3)       \n\t"  \
       "mullw  %%r8, %%r7, %%r6    \n\t"  \
       "mulhwu %%r9, %%r7, %%r6    \n\t"  \
       "adde   %%r8, %%r8, %%r5    \n\t"  \
       "lwz    %%r7, 4(%%r4)       \n\t"  \
       "addze  %%r5, %%r9          \n\t"  \
       "addc   %%r8, %%r8, %%r7    \n\t"  \
       "stwu   %%r8, 4(%%r4)       \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                       \
       "addze  %%r5, %%r5          \n\t"  \
       "addi   %%r4, %%r4, 4       \n\t"  \
       "addi   %%r3, %%r3, 4       \n\t"  \
       "stw    %%r5, %0            \n\t"  \
       "stw    %%r4, %1            \n\t"  \
       "stw    %%r3, %2            \n\t"  \
       : "=m" (c), "=m" (d), "=m" (s)             \
       : "m" (s), "m" (d), "m" (c), "m" (b)       \
       : "r3", "r4", "r5", "r6", "r7", "r8", "r9" \
   );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                                   \
   asm(                                               \
               "ldx     %3, %%o0               \n\t"  \
               "ldx     %4, %%o1               \n\t"  \
               "ld      %5, %%o2               \n\t"  \
               "ld      %6, %%o3               \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                                   \
               "ld      [%%o0], %%o4           \n\t"  \
               "inc     4, %%o0                \n\t"  \
               "ld      [%%o1], %%o5           \n\t"  \
               "umul    %%o3, %%o4, %%o4       \n\t"  \
               "addcc   %%o4, %%o2, %%o4       \n\t"  \
               "rd      %%y, %%g1              \n\t"  \
               "addx    %%g1, 0, %%g1          \n\t"  \
               "addcc   %%o4, %%o5, %%o4       \n\t"  \
               "st      %%o4, [%%o1]           \n\t"  \
               "addx    %%g1, 0, %%o2          \n\t"  \
               "inc     4, %%o1                \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                           \
               "st      %%o2, %0               \n\t"  \
               "stx     %%o1, %1               \n\t"  \
               "stx     %%o0, %2               \n\t"  \
       : "=m" (c), "=m" (d), "=m" (s)         \
       : "m" (s), "m" (d), "m" (c), "m" (b)   \
       : "g1", "o0", "o1", "o2", "o3", "o4",  \
         "o5"                                 \
       );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                                   \
   asm(                                               \
               "ld      %3, %%o0               \n\t"  \
               "ld      %4, %%o1               \n\t"  \
               "ld      %5, %%o2               \n\t"  \
               "ld      %6, %%o3               \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                                   \
               "ld      [%%o0], %%o4           \n\t"  \
               "inc     4, %%o0                \n\t"  \
               "ld      [%%o1], %%o5           \n\t"  \
               "umul    %%o3, %%o4, %%o4       \n\t"  \
               "addcc   %%o4, %%o2, %%o4       \n\t"  \
               "rd      %%y, %%g1              \n\t"  \
               "addx    %%g1, 0, %%g1          \n\t"  \
               "addcc   %%o4, %%o5, %%o4       \n\t"  \
               "st      %%o4, [%%o1]           \n\t"  \
               "addx    %%g1, 0, %%o2          \n\t"  \
               "inc     4, %%o1                \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                                   \
               "st      %%o2, %0               \n\t"  \
               "st      %%o1, %1               \n\t"  \
               "st      %%o0, %2               \n\t"  \
       : "=m" (c), "=m" (d), "=m" (s)         \
       : "m" (s), "m" (d), "m" (c), "m" (b)   \
       : "g1", "o0", "o1", "o2", "o3", "o4",  \
         "o5"                                 \
       );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                   \
   asm(                               \
       "lwi   r3,   %3         \n\t"  \
       "lwi   r4,   %4         \n\t"  \
       "lwi   r5,   %5         \n\t"  \
       "lwi   r6,   %6         \n\t"  \
       "andi  r7,   r6, 0xffff \n\t"  \
       "bsrli r6,   r6, 16     \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                   \
       "lhui  r8,   r3,   0    \n\t"  \
       "addi  r3,   r3,   2    \n\t"  \
       "lhui  r9,   r3,   0    \n\t"  \
       "addi  r3,   r3,   2    \n\t"  \
       "mul   r10,  r9,  r6    \n\t"  \
       "mul   r11,  r8,  r7    \n\t"  \
       "mul   r12,  r9,  r7    \n\t"  \
       "mul   r13,  r8,  r6    \n\t"  \
       "bsrli  r8, r10,  16    \n\t"  \
       "bsrli  r9, r11,  16    \n\t"  \
       "add   r13, r13,  r8    \n\t"  \
       "add   r13, r13,  r9    \n\t"  \
       "bslli r10, r10,  16    \n\t"  \
       "bslli r11, r11,  16    \n\t"  \
       "add   r12, r12, r10    \n\t"  \
       "addc  r13, r13,  r0    \n\t"  \
       "add   r12, r12, r11    \n\t"  \
       "addc  r13, r13,  r0    \n\t"  \
       "lwi   r10,  r4,   0    \n\t"  \
       "add   r12, r12, r10    \n\t"  \
       "addc  r13, r13,  r0    \n\t"  \
       "add   r12, r12,  r5    \n\t"  \
       "addc   r5, r13,  r0    \n\t"  \
       "swi   r12,  r4,   0    \n\t"  \
       "addi   r4,  r4,   4    \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                   \
       "swi   r5,   %0         \n\t"  \
       "swi   r4,   %1         \n\t"  \
       "swi   r3,   %2         \n\t"  \
       : "=m" (c), "=m" (d), "=m" (s)             \
       : "m" (s), "m" (d), "m" (c), "m" (b)       \
       : "r3", "r4", "r5", "r6", "r7", "r8",      \
         "r9", "r10", "r11", "r12", "r13"         \
   );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                           \
   asm(                                       \
       "ld.a   %%a2, %3                \n\t"  \
       "ld.a   %%a3, %4                \n\t"  \
       "ld.w   %%d4, %5                \n\t"  \
       "ld.w   %%d1, %6                \n\t"  \
       "xor    %%d5, %%d5              \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                           \
       "ld.w   %%d0,   [%%a2+]         \n\t"  \
       "madd.u %%e2, %%e4, %%d0, %%d1  \n\t"  \
       "ld.w   %%d0,   [%%a3]          \n\t"  \
       "addx   %%d2,    %%d2,  %%d0    \n\t"  \
       "addc   %%d3,    %%d3,    0     \n\t"  \
       "mov    %%d4,    %%d3           \n\t"  \
       "st.w  [%%a3+],  %%d2           \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                           \
       "st.w   %0, %%d4                \n\t"  \
       "st.a   %1, %%a3                \n\t"  \
       "st.a   %2, %%a2                \n\t"  \
       : "=m" (c), "=m" (d), "=m" (s)         \
       : "m" (s), "m" (d), "m" (c), "m" (b)   \
       : "d0", "d1", "e2", "d4", "a2", "a3"   \
   );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CANNOT_USE_R7">Marco <span>MULADDC_CANNOT_USE_R7</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CANNOT_USE_R7
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                                   \
   asm(                                               \
           "ldr    r0, %3                      \n\t"  \
           "ldr    r1, %4                      \n\t"  \
           "ldr    r2, %5                      \n\t"  \
           "ldr    r3, %6                      \n\t"  \
           "lsr    r7, r3, #16                 \n\t"  \
           "mov    r9, r7                      \n\t"  \
           "lsl    r7, r3, #16                 \n\t"  \
           "lsr    r7, r7, #16                 \n\t"  \
           "mov    r8, r7                      \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                                   \
           "ldmia  r0!, {r6}                   \n\t"  \
           "lsr    r7, r6, #16                 \n\t"  \
           "lsl    r6, r6, #16                 \n\t"  \
           "lsr    r6, r6, #16                 \n\t"  \
           "mov    r4, r8                      \n\t"  \
           "mul    r4, r6                      \n\t"  \
           "mov    r3, r9                      \n\t"  \
           "mul    r6, r3                      \n\t"  \
           "mov    r5, r9                      \n\t"  \
           "mul    r5, r7                      \n\t"  \
           "mov    r3, r8                      \n\t"  \
           "mul    r7, r3                      \n\t"  \
           "lsr    r3, r6, #16                 \n\t"  \
           "add    r5, r5, r3                  \n\t"  \
           "lsr    r3, r7, #16                 \n\t"  \
           "add    r5, r5, r3                  \n\t"  \
           "add    r4, r4, r2                  \n\t"  \
           "mov    r2, #0                      \n\t"  \
           "adc    r5, r2                      \n\t"  \
           "lsl    r3, r6, #16                 \n\t"  \
           "add    r4, r4, r3                  \n\t"  \
           "adc    r5, r2                      \n\t"  \
           "lsl    r3, r7, #16                 \n\t"  \
           "add    r4, r4, r3                  \n\t"  \
           "adc    r5, r2                      \n\t"  \
           "ldr    r3, [r1]                    \n\t"  \
           "add    r4, r4, r3                  \n\t"  \
           "adc    r2, r5                      \n\t"  \
           "stmia  r1!, {r4}                   \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                                   \
           "str    r2, %0                      \n\t"  \
           "str    r1, %1                      \n\t"  \
           "str    r0, %2                      \n\t"  \
        : "=m" (c), "=m" (d), "=m" (s)       \
        : "m" (s), "m" (d), "m" (c), "m" (b)  \
        : "r0", "r1", "r2", "r3", "r4", "r5", \
          "r6", "r7", "r8", "r9", "cc"        \
        );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                           \
   asm(
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                           \
           "ldr    r0, [%0], #4        \n\t"  \
           "ldr    r1, [%1]            \n\t"  \
           "umaal  r1, %2, %3, r0      \n\t"  \
           "str    r1, [%1], #4        \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                           \
        : "=r" (s), "=r" (d), "=r" (c)       \
        : "r" (b), "0" (s), "1" (d), "2" (c)  \
        : "r0", "r1", "memory"                \
        );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                                   \
   asm(                                               \
           "ldr    r0, %3                      \n\t"  \
           "ldr    r1, %4                      \n\t"  \
           "ldr    r2, %5                      \n\t"  \
           "ldr    r3, %6                      \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                                   \
           "ldr    r4, [r0], #4                \n\t"  \
           "mov    r5, #0                      \n\t"  \
           "ldr    r6, [r1]                    \n\t"  \
           "umlal  r2, r5, r3, r4              \n\t"  \
           "adds   r7, r6, r2                  \n\t"  \
           "adc    r2, r5, #0                  \n\t"  \
           "str    r7, [r1], #4                \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                                   \
           "str    r2, %0                      \n\t"  \
           "str    r1, %1                      \n\t"  \
           "str    r0, %2                      \n\t"  \
        : "=m" (c), "=m" (d), "=m" (s)       \
        : "m" (s), "m" (d), "m" (c), "m" (b)  \
        : "r0", "r1", "r2", "r3", "r4", "r5", \
          "r6", "r7", "cc"                    \
        );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                   \
   asm(                               \
       "ldq    $1, %3          \n\t"  \
       "ldq    $2, %4          \n\t"  \
       "ldq    $3, %5          \n\t"  \
       "ldq    $4, %6          \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                   \
       "ldq    $6,  0($1)      \n\t"  \
       "addq   $1,  8, $1      \n\t"  \
       "mulq   $6, $4, $7      \n\t"  \
       "umulh  $6, $4, $6      \n\t"  \
       "addq   $7, $3, $7      \n\t"  \
       "cmpult $7, $3, $3      \n\t"  \
       "ldq    $5,  0($2)      \n\t"  \
       "addq   $7, $5, $7      \n\t"  \
       "cmpult $7, $5, $5      \n\t"  \
       "stq    $7,  0($2)      \n\t"  \
       "addq   $2,  8, $2      \n\t"  \
       "addq   $6, $3, $3      \n\t"  \
       "addq   $5, $3, $3      \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                                   \
       "stq    $3, %0          \n\t"  \
       "stq    $2, %1          \n\t"  \
       "stq    $1, %2          \n\t"  \
       : "=m" (c), "=m" (d), "=m" (s)             \
       : "m" (s), "m" (d), "m" (c), "m" (b)       \
       : "$1", "$2", "$3", "$4", "$5", "$6", "$7" \
   );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                   \
   asm(                               \
       "lw     $10, %3         \n\t"  \
       "lw     $11, %4         \n\t"  \
       "lw     $12, %5         \n\t"  \
       "lw     $13, %6         \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                   \
       "lw     $14, 0($10)     \n\t"  \
       "multu  $13, $14        \n\t"  \
       "addi   $10, $10, 4     \n\t"  \
       "mflo   $14             \n\t"  \
       "mfhi   $9              \n\t"  \
       "addu   $14, $12, $14   \n\t"  \
       "lw     $15, 0($11)     \n\t"  \
       "sltu   $12, $14, $12   \n\t"  \
       "addu   $15, $14, $15   \n\t"  \
       "sltu   $14, $15, $14   \n\t"  \
       "addu   $12, $12, $9    \n\t"  \
       "sw     $15, 0($11)     \n\t"  \
       "addu   $12, $12, $14   \n\t"  \
       "addi   $11, $11, 4     \n\t"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                   \
       "sw     $12, %0         \n\t"  \
       "sw     $11, %1         \n\t"  \
       "sw     $10, %2         \n\t"  \
       : "=m" (c), "=m" (d), "=m" (s)                     \
       : "m" (s), "m" (d), "m" (c), "m" (b)               \
       : "$9", "$10", "$11", "$12", "$13", "$14", "$15", "lo", "hi" \
   );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                           \
   __asm  mov    esi, s                     \
   __asm  mov    edi, d                     \
   __asm  mov    ecx, c                     \
   __asm  mov    ebx, b
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                           \
   __asm  lodsd                              \
   __asm  mul    ebx                        \
   __asm  add    eax, ecx                   \
   __asm  adc    edx, 0                     \
   __asm  add    eax, [edi]                 \
   __asm  adc    edx, 0                     \
   __asm  mov    ecx, edx                   \
   __asm  stosd
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="EMIT">Marco <span>EMIT</span></h4>
      <pre class="doc-declare"><code>#define EMIT __asm _emit
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_HUIT">Marco <span>MULADDC_HUIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_HUIT                           \
   EMIT 15 EMIT 6E EMIT 0xC9            \
   EMIT 15 EMIT 6E EMIT 0xC3            \
   EMIT 15 EMIT 6E EMIT 31            \
   EMIT 15 EMIT 0xD4 EMIT 0xCB            \
   EMIT 15 EMIT 6E EMIT 22            \
   EMIT 15 EMIT 244 EMIT 0xD0            \
   EMIT 15 EMIT 6E EMIT 102 EMIT 4 \
   EMIT 15 EMIT 244 EMIT 0xE0            \
   EMIT 15 EMIT 6E EMIT 118 EMIT 8 \
   EMIT 15 EMIT 244 EMIT 240            \
   EMIT 15 EMIT 6E EMIT 7E EMIT 0C \
   EMIT 15 EMIT 244 EMIT 248            \
   EMIT 15 EMIT 0xD4 EMIT 0xCA            \
   EMIT 15 EMIT 6E EMIT 95 EMIT 4 \
   EMIT 15 EMIT 0xD4 EMIT 0xDC            \
   EMIT 15 EMIT 6E EMIT 111 EMIT 8 \
   EMIT 15 EMIT 0xD4 EMIT 0xEE            \
   EMIT 15 EMIT 6E EMIT 103 EMIT 0C \
   EMIT 15 EMIT 0xD4 EMIT 15C            \
   EMIT 15 EMIT 7E EMIT 15            \
   EMIT 15 EMIT 6E EMIT 86 EMIT 16 \
   EMIT 15 EMIT 244 EMIT 0xD0            \
   EMIT 15 EMIT 115 EMIT 0xD1 EMIT 32 \
   EMIT 15 EMIT 6E EMIT 102 EMIT 20 \
   EMIT 15 EMIT 244 EMIT 0xE0            \
   EMIT 15 EMIT 0xD4 EMIT 0xCB            \
   EMIT 15 EMIT 6E EMIT 118 EMIT 24 \
   EMIT 15 EMIT 244 EMIT 240            \
   EMIT 15 EMIT 7E EMIT 79 EMIT 4 \
   EMIT 15 EMIT 115 EMIT 0xD1 EMIT 32 \
   EMIT 15 EMIT 6E EMIT 5E EMIT 1C \
   EMIT 15 EMIT 244 EMIT 0xD8            \
   EMIT 15 EMIT 0xD4 EMIT 0xCD            \
   EMIT 15 EMIT 6E EMIT 111 EMIT 16 \
   EMIT 15 EMIT 0xD4 EMIT 0xD5            \
   EMIT 15 EMIT 7E EMIT 79 EMIT 8 \
   EMIT 15 EMIT 115 EMIT 0xD1 EMIT 32 \
   EMIT 15 EMIT 0xD4 EMIT 0xCF            \
   EMIT 15 EMIT 6E EMIT 111 EMIT 20 \
   EMIT 15 EMIT 0xD4 EMIT 0xE5            \
   EMIT 15 EMIT 7E EMIT 79 EMIT 0C \
   EMIT 15 EMIT 115 EMIT 0xD1 EMIT 32 \
   EMIT 15 EMIT 0xD4 EMIT 0xCA            \
   EMIT 15 EMIT 6E EMIT 111 EMIT 24 \
   EMIT 15 EMIT 0xD4 EMIT 245            \
   EMIT 15 EMIT 7E EMIT 79 EMIT 16 \
   EMIT 15 EMIT 115 EMIT 0xD1 EMIT 32 \
   EMIT 15 EMIT 0xD4 EMIT 0xCC            \
   EMIT 15 EMIT 6E EMIT 111 EMIT 1C \
   EMIT 15 EMIT 0xD4 EMIT 0xDD            \
   EMIT 15 EMIT 7E EMIT 79 EMIT 20 \
   EMIT 15 EMIT 115 EMIT 0xD1 EMIT 32 \
   EMIT 15 EMIT 0xD4 EMIT 0xCE            \
   EMIT 15 EMIT 7E EMIT 79 EMIT 24 \
   EMIT 15 EMIT 115 EMIT 0xD1 EMIT 32 \
   EMIT 15 EMIT 0xD4 EMIT 0xCB            \
   EMIT 15 EMIT 7E EMIT 79 EMIT 1C \
   EMIT 131 EMIT 0xC7 EMIT 32            \
   EMIT 131 EMIT 0xC6 EMIT 32            \
   EMIT 15 EMIT 115 EMIT 0xD1 EMIT 32 \
   EMIT 15 EMIT 7E EMIT 0xC9
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                           \
   EMIT 15 EMIT 119                       \
   __asm  mov    c, ecx                     \
   __asm  mov    d, edi                     \
   __asm  mov    s, esi                     \

</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                           \
   __asm  mov    c, ecx                     \
   __asm  mov    d, edi                     \
   __asm  mov    s, esi                     \

</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                   \
{                                      \
   mbedtls_t_udbl r;                          \
   mbedtls_mpi_uint r0, r1;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                   \
   r  = *(s++) * (mbedtls_t_udbl) b;         \
   r0 = (mbedtls_mpi_uint) r;                  \
   r1 = (mbedtls_mpi_uint)( r >> biL );        \
   r0 += c; r1 += (r0 < c);         \
   r0 += *d; r1 += (r0 < *d);         \
   c = r1; *(d++) = r0;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                   \
}
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_INIT">Marco <span>MULADDC_INIT</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_INIT                   \
{                                      \
   mbedtls_mpi_uint s0, s1, b0, b1;             \
   mbedtls_mpi_uint r0, r1, rx, ry;             \
   b0 = ( b << biH ) >> biH;          \
   b1 = ( b >> biH );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_CORE">Marco <span>MULADDC_CORE</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_CORE                   \
   s0 = ( *s << biH ) >> biH;         \
   s1 = ( *s >> biH ); s++;           \
   rx = s0 * b1; r0 = s0 * b0;        \
   ry = s1 * b0; r1 = s1 * b1;        \
   r1 += ( rx >> biH );               \
   r1 += ( ry >> biH );               \
   rx <<= biH; ry <<= biH;            \
   r0 += rx; r1 += (r0 < rx);         \
   r0 += ry; r1 += (r0 < ry);         \
   r0 += c; r1 += (r0 < c);         \
   r0 += *d; r1 += (r0 < *d);         \
   c = r1; *(d++) = r0;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MULADDC_STOP">Marco <span>MULADDC_STOP</span></h4>
      <pre class="doc-declare"><code>#define MULADDC_STOP                   \
}
</code></pre>
      <pre class="doc-comment"></pre>
      <h3 id="functions">Functions</h3>
      
      <h3 id="vars">Vars</h3>
      
      <h3 id="consts">Consts</h3>
      
      <h3 id="types">Types</h3>
      
      <h3 id="typedefs">Typedefs</h3>
      
    </div>
  </body>
</html>
            